<?
if (!defined('baseinfo')) {
    exitdata();
}   
?>
<script src="<?=baseinfo?>/js/scriptsubmain.js"></script>
<script>
var targetdiv='#main-middle';
//initmapdata()
                                            <?if($data['data']['productid']){?>

 <?
 if($data['data']['iscredit'])
 {
 ?>
 var dataplugin={};
 dataplugin['productid']=<?=$data['data']['productid']?>;
 dataplugin['credit']=<?=$data['data']['credit']?>;
 var stringcredit=getformcredit(dataplugin);
 $(''+targetdiv+' .wrpBodyLd.clBd2.bdBtm').append(stringcredit);
 <?
 
 
 }
 
 ?>                                           
                                            
                                            
var clip = null;
clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
clip.addEventListener('mouseOver', function (client) {
                // update the text on mouse over
                clip.setText( baseinfo+'/post/<?=$data['data']['productid']?>' );
     
            });
clip.addEventListener( 'complete', function(client, text) {
                $('.shrMenuListPop.shrLdPop').removeClass('sortHomeBlock');
            } );

//console.log(datanow.productid);
clip.glue( 'd_clip_button', 'd_clip_container' );
                                          
                                        <?    }?>
<?
if($data['data']['feature']['isbooking'])
{
?>

     $( ''+targetdiv+' .bookingcontent input[name="checkindate"]').datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
dateFormat:'dd/mm/yy',
onClose: function( selectedDate ) {
$(  '.ovlPopLd '+targetdiv+' .bookingcontent input[name="checkindate"]' ).datepicker( "option", "minDate", selectedDate );
}
});

    $( ''+targetdiv+' .bookingcontent input[name="checkoutdate"]' ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
dateFormat:'dd/mm/yy',
onClose: function( selectedDate ) {
$(   '.ovlPopLd '+targetdiv+' .bookingcontent input[name="checkindate"]' ).datepicker( "option", "maxDate", selectedDate );
}
});

<?
}

?>





<?if(count($data['script']))
{
foreach($data['script'] as $valuescript)

{
echo $valuescript;

}

}

?>
</script>